﻿@{
    Layout = "~/Views/Shared/_Layout1.cshtml";
}
@using Stackoverflow.Web.Models
@model RegisterBindingModel

<div class="page-register" style="max-width: 280px; margin: 0 auto;">
    <div class="navbar navbar-default login__navbar">
        <h4 class="text-center"><i class="icon-user"></i>@ViewBag.Title</h4>
    </div>
    <form name="model" action="@Url.Action("Register")" method="post">
        @Html.AntiForgeryToken()
        <div class="form-group row">
            <div class="col-xs-8 col-xs-offset-2">
                <input name="UserName" class="form-control text-center" type="text" placeholder="username" autofocus required autocomplete="off" />
            </div>
        </div>
        <div class="form-group row">
            <div class="col-xs-8 col-xs-offset-2">
                <button class="btn btn-danger btn-block">Register</button>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-xs-8 col-xs-offset-2">
                @if (!string.IsNullOrEmpty(ViewBag.Message))
                {
                    <div class="alert alert-success text-center">@ViewBag.Message</div>
                }
                @if (!ViewData.ModelState.IsValid)
                {
                    @Html.ValidationSummary(string.Empty, new { @class = "alert alert-danger" })
                }
            </div>
        </div>
    </form>
</div>